int SensorLED = 13;
int SensorINPUT = 3;
unsigned char state = 0;
void setup() {
  // put your setup code here, to run once:
pinMode(SensorLED,OUTPUT);
pinMode(SensorINPUT,INPUT);
attachInterrupt(1,blink,RISING);
}

void loop() {
  // put your main code here, to run repeatedly:
if(state!=0){
  state = 0;
  digitalWrite(SensorLED,HIGH);
  delay(500);
}else
  digitalWrite(SensorLED,LOW);
}
void blink(){
  state++;
}
